home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 49 / Amiga Format CD49 (2000-01-17)(Future Publishing)(GB)(Track 1 of 3)[!][issue 2000-02].iso / -serious- / misc / charmap / source / cmap_strings.h < prev    next >
C/C++ Source or Header  |  1999-11-30  |  9KB  |  329 lines

  1. #ifndef CMAP_STRINGS_H
  2. #define CMAP_STRINGS_H
  3.  
  4.  
  5. /****************************************************************************/
  6.  
  7.  
  8. /* This file was created automatically by CatComp.
  9.  * Do NOT edit by hand!
  10.  */
  11.  
  12.  
  13. #ifndef EXEC_TYPES_H
  14. #include <exec/types.h>
  15. #endif
  16.  
  17. #ifdef CATCOMP_ARRAY
  18. #undef CATCOMP_NUMBERS
  19. #undef CATCOMP_STRINGS
  20. #define CATCOMP_NUMBERS
  21. #define CATCOMP_STRINGS
  22. #endif
  23.  
  24. #ifdef CATCOMP_BLOCK
  25. #undef CATCOMP_STRINGS
  26. #define CATCOMP_STRINGS
  27. #endif
  28.  
  29.  
  30. /****************************************************************************/
  31.  
  32.  
  33. #ifdef CATCOMP_NUMBERS
  34.  
  35. #define MSG_WINTITLE 0
  36. #define MSG_STRGAD 1
  37. #define MSG_COPY 2
  38. #define MSG_PASTE 3
  39. #define MSG_CLEAR 4
  40. #define MSG_NEWFONT 5
  41. #define MSG_MENUTITLE 6
  42. #define MSG_MENUFONTSCREEN 7
  43. #define MSG_MENUTEXTFONT 8
  44. #define MSG_MENUCUSTOMFONT 9
  45. #define MSG_MENUCHARSET 10
  46. #define MSG_MENUASCII8 11
  47. #define MSG_MENUISOLATIN1 12
  48. #define MSG_MENUSTDAMIGA 13
  49. #define MSG_MENUCLEARTXT 14
  50. #define MSG_NEXTSCR 15
  51. #define MSG_MENUABOUT 16
  52. #define MSG_MENUICONOFY 17
  53. #define MSG_MENUHIDE 18
  54. #define MSG_MENUQUIT 19
  55. #define MSG_BADOS 20
  56. #define MSG_SCREENLOCK 21
  57. #define MSG_ERRMENUBAR 22
  58. #define MSG_ERRLAYOUT 23
  59. #define MSG_FONTTOOBIG 24
  60. #define MSG_ERRGADGET 25
  61. #define MSG_ABOUT 26
  62. #define MSG_ABOUTMSG 27
  63. #define MSG_CONTINUE 28
  64. #define MSG_COMMONAME 29
  65. #define MSG_DESCLINE1 30
  66. #define MSG_DESCLINE2 31
  67. #define MSG_ASLTITLE 32
  68. #define MSG_NOASL 33
  69. #define MSG_BUTTON1 34
  70. #define MSG_BUTTON2 35
  71. #define MSG_CODE 36
  72. #define MSG_HEX 37
  73. #define MSG_DEC 38
  74. #define MSG_OCT 39
  75. #define MSG_NOMEM 40
  76.  
  77. #endif /* CATCOMP_NUMBERS */
  78.  
  79.  
  80. /****************************************************************************/
  81.  
  82.  
  83. #ifdef CATCOMP_STRINGS
  84.  
  85. #define MSG_WINTITLE_STR "ISO Latin1 charset"
  86. #define MSG_STRGAD_STR "String:"
  87. #define MSG_COPY_STR "Copy"
  88. #define MSG_PASTE_STR "Paste"
  89. #define MSG_CLEAR_STR "Clear"
  90. #define MSG_NEWFONT_STR "Font..."
  91. #define MSG_MENUTITLE_STR "Project"
  92. #define MSG_MENUFONTSCREEN_STR "Screen font"
  93. #define MSG_MENUTEXTFONT_STR "Text font"
  94. #define MSG_MENUCUSTOMFONT_STR "Choose one..."
  95. #define MSG_MENUCHARSET_STR "Charset"
  96. #define MSG_MENUASCII8_STR "8bits ASCII"
  97. #define MSG_MENUISOLATIN1_STR "ISO Latin1"
  98. #define MSG_MENUSTDAMIGA_STR "Amiga Standard"
  99. #define MSG_MENUCLEARTXT_STR "Clear text"
  100. #define MSG_NEXTSCR_STR "Next screen"
  101. #define MSG_MENUABOUT_STR "About..."
  102. #define MSG_MENUICONOFY_STR "Iconify"
  103. #define MSG_MENUHIDE_STR "Hide"
  104. #define MSG_MENUQUIT_STR "Quit"
  105. #define MSG_BADOS_STR "Requires WB v36 or more."
  106. #define MSG_SCREENLOCK_STR "The default public screen is locked!"
  107. #define MSG_ERRMENUBAR_STR "Unable to create menu bar!"
  108. #define MSG_ERRLAYOUT_STR "Error in the menu layout!"
  109. #define MSG_FONTTOOBIG_STR "The size of your font is too big."
  110. #define MSG_ERRGADGET_STR "Unable to alloc gadgets ressoures."
  111. #define MSG_ABOUT_STR "About"
  112. #define MSG_ABOUTMSG_STR "CharMap v" CHARMAP_VERSION "\n© T.Pierron\nFree software under GNU license\nProvide with no warranty!"
  113. #define MSG_CONTINUE_STR "Continue"
  114. #define MSG_COMMONAME_STR "CharMap"
  115. #define MSG_DESCLINE1_STR "A little tool, enable you to display"
  116. #define MSG_DESCLINE2_STR "the whole charset of a font"
  117. #define MSG_ASLTITLE_STR "Choose your font"
  118. #define MSG_NOASL_STR "Unable to open the ASL requester!"
  119. #define MSG_BUTTON1_STR "Choose"
  120. #define MSG_BUTTON2_STR "Quit"
  121. #define MSG_CODE_STR "Code:"
  122. #define MSG_HEX_STR "Hex:"
  123. #define MSG_DEC_STR "Dec:"
  124. #define MSG_OCT_STR "Oct:"
  125. #define MSG_NOMEM_STR "Not enough memory"
  126.  
  127. #endif /* CATCOMP_STRINGS */
  128.  
  129.  
  130. /****************************************************************************/
  131.  
  132.  
  133. #ifdef CATCOMP_ARRAY
  134.  
  135. struct CatCompArrayType
  136. {
  137.     LONG   cca_ID;
  138.     STRPTR cca_Str;
  139. };
  140.  
  141. static const struct CatCompArrayType CatCompArray[] =
  142. {
  143.     {MSG_WINTITLE,(STRPTR)MSG_WINTITLE_STR},
  144.     {MSG_STRGAD,(STRPTR)MSG_STRGAD_STR},
  145.     {MSG_COPY,(STRPTR)MSG_COPY_STR},
  146.     {MSG_PASTE,(STRPTR)MSG_PASTE_STR},
  147.     {MSG_CLEAR,(STRPTR)MSG_CLEAR_STR},
  148.     {MSG_NEWFONT,(STRPTR)MSG_NEWFONT_STR},
  149.     {MSG_MENUTITLE,(STRPTR)MSG_MENUTITLE_STR},
  150.     {MSG_MENUFONTSCREEN,(STRPTR)MSG_MENUFONTSCREEN_STR},
  151.     {MSG_MENUTEXTFONT,(STRPTR)MSG_MENUTEXTFONT_STR},
  152.     {MSG_MENUCUSTOMFONT,(STRPTR)MSG_MENUCUSTOMFONT_STR},
  153.     {MSG_MENUCHARSET,(STRPTR)MSG_MENUCHARSET_STR},
  154.     {MSG_MENUASCII8,(STRPTR)MSG_MENUASCII8_STR},
  155.     {MSG_MENUISOLATIN1,(STRPTR)MSG_MENUISOLATIN1_STR},
  156.     {MSG_MENUSTDAMIGA,(STRPTR)MSG_MENUSTDAMIGA_STR},
  157.     {MSG_MENUCLEARTXT,(STRPTR)MSG_MENUCLEARTXT_STR},
  158.     {MSG_NEXTSCR,(STRPTR)MSG_NEXTSCR_STR},
  159.     {MSG_MENUABOUT,(STRPTR)MSG_MENUABOUT_STR},
  160.     {MSG_MENUICONOFY,(STRPTR)MSG_MENUICONOFY_STR},
  161.     {MSG_MENUHIDE,(STRPTR)MSG_MENUHIDE_STR},
  162.     {MSG_MENUQUIT,(STRPTR)MSG_MENUQUIT_STR},
  163.     {MSG_BADOS,(STRPTR)MSG_BADOS_STR},
  164.     {MSG_SCREENLOCK,(STRPTR)MSG_SCREENLOCK_STR},
  165.     {MSG_ERRMENUBAR,(STRPTR)MSG_ERRMENUBAR_STR},
  166.     {MSG_ERRLAYOUT,(STRPTR)MSG_ERRLAYOUT_STR},
  167.     {MSG_FONTTOOBIG,(STRPTR)MSG_FONTTOOBIG_STR},
  168.     {MSG_ERRGADGET,(STRPTR)MSG_ERRGADGET_STR},
  169.     {MSG_ABOUT,(STRPTR)MSG_ABOUT_STR},
  170.     {MSG_ABOUTMSG,(STRPTR)MSG_ABOUTMSG_STR},
  171.     {MSG_CONTINUE,(STRPTR)MSG_CONTINUE_STR},
  172.     {MSG_COMMONAME,(STRPTR)MSG_COMMONAME_STR},
  173.     {MSG_DESCLINE1,(STRPTR)MSG_DESCLINE1_STR},
  174.     {MSG_DESCLINE2,(STRPTR)MSG_DESCLINE2_STR},
  175.     {MSG_ASLTITLE,(STRPTR)MSG_ASLTITLE_STR},
  176.     {MSG_NOASL,(STRPTR)MSG_NOASL_STR},
  177.     {MSG_BUTTON1,(STRPTR)MSG_BUTTON1_STR},
  178.     {MSG_BUTTON2,(STRPTR)MSG_BUTTON2_STR},
  179.     {MSG_CODE,(STRPTR)MSG_CODE_STR},
  180.     {MSG_HEX,(STRPTR)MSG_HEX_STR},
  181.     {MSG_DEC,(STRPTR)MSG_DEC_STR},
  182.     {MSG_OCT,(STRPTR)MSG_OCT_STR},
  183.     {MSG_NOMEM,(STRPTR)MSG_NOMEM_STR},
  184. };
  185.  
  186. #endif /* CATCOMP_ARRAY */
  187.  
  188.  
  189. /****************************************************************************/
  190.  
  191.  
  192. #ifdef CATCOMP_BLOCK
  193.  
  194. static const char CatCompBlock[] =
  195. {
  196.     "\x00\x00\x00\x00\x00\x14"
  197.     MSG_WINTITLE_STR "\x00\x00"
  198.     "\x00\x00\x00\x01\x00\x08"
  199.     MSG_STRGAD_STR "\x00"
  200.     "\x00\x00\x00\x02\x00\x06"
  201.     MSG_COPY_STR "\x00\x00"
  202.     "\x00\x00\x00\x03\x00\x06"
  203.     MSG_PASTE_STR "\x00"
  204.     "\x00\x00\x00\x04\x00\x06"
  205.     MSG_CLEAR_STR "\x00"
  206.     "\x00\x00\x00\x05\x00\x08"
  207.     MSG_NEWFONT_STR "\x00"
  208.     "\x00\x00\x00\x06\x00\x08"
  209.     MSG_MENUTITLE_STR "\x00"
  210.     "\x00\x00\x00\x07\x00\x0C"
  211.     MSG_MENUFONTSCREEN_STR "\x00"
  212.     "\x00\x00\x00\x08\x00\x0A"
  213.     MSG_MENUTEXTFONT_STR "\x00"
  214.     "\x00\x00\x00\x09\x00\x0E"
  215.     MSG_MENUCUSTOMFONT_STR "\x00"
  216.     "\x00\x00\x00\x0A\x00\x08"
  217.     MSG_MENUCHARSET_STR "\x00"
  218.     "\x00\x00\x00\x0B\x00\x0C"
  219.     MSG_MENUASCII8_STR "\x00"
  220.     "\x00\x00\x00\x0C\x00\x0C"
  221.     MSG_MENUISOLATIN1_STR "\x00\x00"
  222.     "\x00\x00\x00\x0D\x00\x10"
  223.     MSG_MENUSTDAMIGA_STR "\x00\x00"
  224.     "\x00\x00\x00\x0E\x00\x0C"
  225.     MSG_MENUCLEARTXT_STR "\x00\x00"
  226.     "\x00\x00\x00\x0F\x00\x0C"
  227.     MSG_NEXTSCR_STR "\x00"
  228.     "\x00\x00\x00\x10\x00\x0A"
  229.     MSG_MENUABOUT_STR "\x00\x00"
  230.     "\x00\x00\x00\x11\x00\x08"
  231.     MSG_MENUICONOFY_STR "\x00"
  232.     "\x00\x00\x00\x12\x00\x06"
  233.     MSG_MENUHIDE_STR "\x00\x00"
  234.     "\x00\x00\x00\x13\x00\x06"
  235.     MSG_MENUQUIT_STR "\x00\x00"
  236.     "\x00\x00\x00\x14\x00\x1A"
  237.     MSG_BADOS_STR "\x00\x00"
  238.     "\x00\x00\x00\x15\x00\x26"
  239.     MSG_SCREENLOCK_STR "\x00\x00"
  240.     "\x00\x00\x00\x16\x00\x1C"
  241.     MSG_ERRMENUBAR_STR "\x00\x00"
  242.     "\x00\x00\x00\x17\x00\x1A"
  243.     MSG_ERRLAYOUT_STR "\x00"
  244.     "\x00\x00\x00\x18\x00\x22"
  245.     MSG_FONTTOOBIG_STR "\x00"
  246.     "\x00\x00\x00\x19\x00\x24"
  247.     MSG_ERRGADGET_STR "\x00\x00"
  248.     "\x00\x00\x00\x1A\x00\x06"
  249.     MSG_ABOUT_STR "\x00"
  250.     "\x00\x00\x00\x1B\x00\x64"
  251.     MSG_ABOUTMSG_STR "\x00\x00"
  252.     "\x00\x00\x00\x1C\x00\x0A"
  253.     MSG_CONTINUE_STR "\x00\x00"
  254.     "\x00\x00\x00\x1D\x00\x08"
  255.     MSG_COMMONAME_STR "\x00"
  256.     "\x00\x00\x00\x1E\x00\x26"
  257.     MSG_DESCLINE1_STR "\x00\x00"
  258.     "\x00\x00\x00\x1F\x00\x1C"
  259.     MSG_DESCLINE2_STR "\x00"
  260.     "\x00\x00\x00\x20\x00\x12"
  261.     MSG_ASLTITLE_STR "\x00\x00"
  262.     "\x00\x00\x00\x21\x00\x22"
  263.     MSG_NOASL_STR "\x00"
  264.     "\x00\x00\x00\x22\x00\x08"
  265.     MSG_BUTTON1_STR "\x00\x00"
  266.     "\x00\x00\x00\x23\x00\x06"
  267.     MSG_BUTTON2_STR "\x00\x00"
  268.     "\x00\x00\x00\x24\x00\x06"
  269.     MSG_CODE_STR "\x00"
  270.     "\x00\x00\x00\x25\x00\x06"
  271.     MSG_HEX_STR "\x00\x00"
  272.     "\x00\x00\x00\x26\x00\x06"
  273.     MSG_DEC_STR "\x00\x00"
  274.     "\x00\x00\x00\x27\x00\x06"
  275.     MSG_OCT_STR "\x00\x00"
  276.     "\x00\x00\x00\x28\x00\x12"
  277.     MSG_NOMEM_STR "\x00"
  278. };
  279.  
  280. #endif /* CATCOMP_BLOCK */
  281.  
  282.  
  283. /****************************************************************************/
  284.  
  285.  
  286. struct LocaleInfo
  287. {
  288.     APTR li_LocaleBase;
  289.     APTR li_Catalog;
  290. };
  291.  
  292.  
  293. #ifdef CATCOMP_CODE
  294.  
  295. STRPTR GetString(struct LocaleInfo *li, LONG stringNum)
  296. {
  297. LONG   *l;
  298. UWORD  *w;
  299. STRPTR  builtIn;
  300.  
  301.     l = (LONG *)CatCompBlock;
  302.  
  303.     while (*l != stringNum)
  304.     {
  305.         w = (UWORD *)((ULONG)l + 4);
  306.         l = (LONG *)((ULONG)l + (ULONG)*w + 6);
  307.     }
  308.     builtIn = (STRPTR)((ULONG)l + 6);
  309.  
  310. #define XLocaleBase LocaleBase
  311. #define LocaleBase li->li_LocaleBase
  312.     
  313.     if (LocaleBase)
  314.         return(GetCatalogStr(li->li_Catalog,stringNum,builtIn));
  315. #define LocaleBase XLocaleBase
  316. #undef XLocaleBase
  317.  
  318.     return(builtIn);
  319. }
  320.  
  321.  
  322. #endif /* CATCOMP_CODE */
  323.  
  324.  
  325. /****************************************************************************/
  326.  
  327.  
  328. #endif /* CMAP_STRINGS_H */
  329.